Technical Q&A SND18
Synchronous SysBeep


Q: With Sound Manager 3.1 the system beep, SysBeep, became asynchronous. For my particular application I need to wait until the SysBeep is done playing the sound before I want to continue. How do I get the functionality of the old synchronous SysBeep?

A: The answer to getting a synchronous SysBeep is very simple, and doesn’t involve you trying to figure out how long to wait. Just ask the Sound Manager to play SysBeep synchronously and it will.

OSErr MakeSysBeepSynchronous (SInt16 *oldState) {
    OSErr        err;

    SndGetSysBeepState (oldState);
    err = SndSetSysBeepState (sysBeepEnable | sysBeepSynchronous);

    return err;
}

[Oct 05 1999]


Developer Documentation | Technical Notes | Development Kits | Sample Code